package com.company.beauty.ids;

import com.company.beauty.ids.handler.SnowflakeHandler;
import com.company.beauty.ids.handler.SnowflakeRedisHandler;
import com.company.nuwa.redis.RedisAutoConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>ids auto configuration</p >
 *
 * @author youyoukele
 * @version 1.0
 * @date 2024/04/22
 */
@Slf4j
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter({RedisAutoConfiguration.class})
public class IdsAutoConfiguration {

    @Bean
    public SnowflakeHandler snowflakeRedisHandler() {
        log.info("nasa3 ids starter load snowflake redis handler");
        return new SnowflakeRedisHandler();
    }

}
